import http from '@/utils/http/axios'
export interface DictionaryParams {
  dictNames: string
}

export interface BasicResponseModel<T = any> {
  code: number
  message: string
  data: T
}
/**
 * @description: 根据名称查询字典
 */
export function getDictionary(params: DictionaryParams) {
  return http.request<BasicResponseModel>(
    {
      url: '/api/dictionary/iu/list',
      method: 'GET',
      params
    },
    {
      joinTime: true
    }
  )
}
/**
 * @description: 自定义列
 */
export function columnList(params: DictionaryParams) {
  return http.request<BasicResponseModel>({
    url: '/api/gdt/account/column/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 账户列表-自定义列列表
 */
export function columnOwnerList(params: DictionaryParams) {
  return http.request<BasicResponseModel>({
    url: '/api/gdt/account/column/owner/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 自定义列保存
 */
export function columnSave(params: DictionaryParams) {
  return http.request<BasicResponseModel>({
    url: '/api/gdt/account/column/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 自定义列删除
 */
export function columnDelete(params: DictionaryParams) {
  return http.request<BasicResponseModel>({
    url: '/api/gdt/account/column/delete',
    method: 'POST',
    params
  })
}
